package fun.linze.wallpaperwebsite.service;

import fun.linze.wallpaperwebsite.dao.user.RegisterDAO;
import fun.linze.wallpaperwebsite.dao.user.UserInfoDAO;
import fun.linze.wallpaperwebsite.domain.TUser;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author wangy
* @description 针对表【t_user(用户表)】的数据库操作Service
* @createDate 2025-06-27 18:02:42
*/
public interface TUserService extends IService<TUser> {
    //判断用户注册是否合法（用户名，邮箱是否冲突）
    boolean isRegisterValid(RegisterDAO registerDAO);
    //注册用户
    boolean registerUser(RegisterDAO registerDAO);
    //根据用户名查询用户信息（不敏感信息）
    UserInfoDAO getUserInfo(String username);
    //根据用户名和密码登录获取Token
    String login(String username, String password);
    //更新用户信息
    boolean updateUserInfo(String username, UserInfoDAO userInfoDAO);
    public String getUsernameFromToken(String token);

}
